<template>
  <div>
    <!-- 未登录的购物车页面 -->
    <div class="unlogin" v-show="false">
      <img src="" alt="">
      <p>亲，需要先登录才能查看购物车哟~</p>
      <button @click="ToLogin">立即登录</button>
    </div>
    <!-- 登陆后购物车空的页面 -->
    <div class="empty" v-show="false">
      <img src="" alt="">
      <p>亲，你的购物车还是空空的哟~</p>
      <button @click="ToHome">继续购物</button>
    </div>
    <!-- 购物车页面 -->
    <div class="List">
      <div class="header">购物车<span>（21）</span></div>
        <ul class="main">
          <li>
            <input type="radio">
            <img src="" alt="">
            <div>
              <span>智能摄像机云台版</span>
              <span>￥1000</span>
            </div>
            <div>
              <div class="el-icon-delete-solid"></div>
              <div>
                <span>-</span>
                <span>1</span>
                <span>+</span>
              </div>
            </div>
          </li>
          <li>
            <input type="radio">
            <img src="" alt="">
            <div>
              <span>智能摄像机云台版</span>
              <span>￥1000</span>
            </div>
            <div>
              <div class="el-icon-delete-solid"></div>
              <div>
                <span>-</span>
                <span>1</span>
                <span>+</span>
              </div>
            </div>
          </li>
          <li>
            <input type="radio">
            <img src="" alt="">
            <div>
              <span>智能摄像机云台版</span>
              <span>￥1000</span>
            </div>
            <div>
              <div class="el-icon-delete-solid"></div>
              <div>
                <span>-</span>
                <span>1</span>
                <span>+</span>
              </div>
            </div>
          </li>
        </ul>
      <div class="footer">
        <input type="radio">
        <span>合计：￥0</span>
        <span>结算</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data:function(){
    return{

    }
  },
  methods:{
    ToLogin(){
      this.$router.push("/Login");
    },
    ToHome(){
      this.$router.push("Home");
    }
  }
}
</script>

<style lang="scss" scoped>
// 未登录的购物车页面
.unlogin{
  text-align: center;
  height: calc(100vh - 60px);
  box-shadow: 0 0 20px 10px #f0f0f0 inset;
  img{
    width: 250px;
    margin-top: 100px;
  }
  button{
    width: 150px;
    height: 40px;
    background-color: orangered;
    border: 0;
    border-radius: 5px;
    font-size: 18px;
    color: white;
    margin-top: 50px;
  }
}
// 登陆后购物车空的页面样式
.empty{
  text-align: center;
  height: calc(100vh - 60px);
  box-shadow: 0 0 20px 10px #f3f3f3 inset;
  img{
    width: 250px;
    margin-top: 100px;
  }
  button{
    width: 150px;
    height: 40px;
    background-color: orangered;
    border: 0;
    border-radius: 20px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    margin-top: 50px;
  }
}
// 购物车页面样式
.List{
  background-color: #F4F4F4;
  height: 100vh;
  position: relative;
  .header{
    height: 60px;
    background-color: rgb(255,138,69);
    font-size: 20px;
    font-weight: bold;
    line-height: 60px;
    padding: 0 20px;
    span{
      font-size: 16px;
    }
  }
  .main{
    padding: 10px;
    li{
      padding: 10px;
      margin: 10px 0;
      height: 80px;
      background-color: white;
      box-shadow: 0px 0px 6px -2px #666;
      border-radius: 5px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      &:first-child{
        margin-top: 0;
      }
      input{
        width: 16px;
        height: 16px;
      }
      img{
        width: 80px;
        height: 80px;
        box-shadow: 0 0 10px 1px #f3f3f3;
      }
      >div{
        &:nth-of-type(1){
          height: 80px;
          width: 140px;
          display: flex;
          flex-direction: column;
          justify-content: space-around;
          span{
            &:nth-of-type(1){
              font-weight: bold;
            }
            &:nth-of-type(2){
              font-size: 14px;
              color: rgb(255,138,69);
            }
          }
        }
        &:nth-of-type(2){
          height: 80px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          align-items: flex-end;
          >div{
            &:nth-of-type(2){
              width: 75px;
              display: flex;
              border: 2px solid #f0f0f0;
              box-sizing: border-box;
              border-radius: 5px;
              span{
                width: 25px;
                height: 20px;
                box-sizing: border-box;
                text-align: center;
                line-height: 25px;
                font-weight: bold;
                &:nth-of-type(2){
                  border-left: 2px solid #f0f0f0;
                  border-right: 2px solid #f0f0f0;
                }
              }
            }
          }
          
        }
        &:nth-of-type(3){
          align-self: start;
          font-size: 18px;
        }
      }
    }
  }
  .footer{
    position: absolute;
    bottom: 60px;
    background-color: rgba($color: #000, $alpha: 0.2);
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0px 0px 6px -2px #666;
    input{
        width: 16px;
        height: 16px;
      }
    span{
      &:nth-of-type(2){
        width: 80px;
        height: 30px;
        background-color: red;
        border-radius: 20px;
        text-align: center;
        line-height: 30px;
        color: white;
      }
    }
  }
}
</style>